package com.study.basetype.enums;

/**
 * @author flwu
 * @date 2020/3/22 3:34 PM
 * @MOTTO 保持空杯和敬畏
 */
public enum  LoveTypeEnum {
    FLWULOVE(1, "flwu"),
    LXIALOVE(2, "Lxia"),
    BABAOLOVE(3, "Babao");

    private int type;
    private String desc;

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    LoveTypeEnum (int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public LoveTypeEnum getEnum(int type) {
        for(LoveTypeEnum loveTypeEnum : LoveTypeEnum.values()) {
            if (type == loveTypeEnum.type) {
                return loveTypeEnum;
            }
        }
        return null;
    }
}
